home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / win / c / winet.com / WINET.DOC < prev    next >
Encoding:
Text File  |  1987-05-13  |  5.8 KB  |  171 lines

  1. *R1
  2. MDDocumentation for Windows Execution Timer
  3. MAD. G. Booth
  4. MR1008
  5. PDMonth D, Year
  6. PTH:MM am/pm
  7. P1HL
  8. P1HC
  9. P1HR
  10. P1FL
  11. P1FC
  12. P1FR
  13. P1C33
  14. FHA1
  15. FTT5
  16. FSH150
  17. FST150
  18. FSS200
  19. FI3
  20. FLN99
  21. DDP1013
  22. DNEPP1013
  23. DP0,8500,11000
  24. NST200
  25. NY3
  26. NT0
  27. NRT(\1\)
  28. NNT\1\:
  29. NRA1
  30. YCL99
  31. OE1
  32. OS1
  33. *B0
  34. S
  35. BSB200
  36. CW12
  37. CFT5
  38. T Command: 
  39. CFT0
  40. TWINET
  41. BSB200
  42. CW12
  43. CFT5
  44. T Usage: 
  45. CFT0
  46. TWINET -t -o -x symfiles ... arguments ...
  47. BSB200
  48. CW12
  49. CFT5
  50. T Purpose: 
  51. CFT0
  52. TTo time execution of a windows program (or programs). The output is a symbolic listing of the relative amount of time spent in each module of the Windows system. When symbol files are given, a list  üof time spent in each procedure is also included.
  53. BSB200
  54. CW12
  55. CFT5
  56. T Options: 
  57. CFT0
  58. T
  59. BSB200
  60. CW11
  61. CR1
  62. CFJ1
  63. CFT9
  64. T-t
  65. CFT0
  66. TThis flag should be followed by a number. This number specifies the number of milliseconds that will elapse between each sample. The default value is 100mS. If it is set lower then the overhead of running WINET will be correspondingly higher, also some of the count values may overflow sooner. N.B. The system will actually run with -t1 specified but the count fields may overflow in just over a minute.
  67. BSB200
  68. CW11
  69. CR1
  70. CFJ1
  71. CFT9
  72. T-o
  73. CFT0
  74. TThis flag should be followed by the filename to use for output. e.g. WINET -oRESULTS.WETThe default is to write the output to the standard output.
  75. BSB200
  76. CW11
  77. CR1
  78. CFJ1
  79. CFT9
  80. T-x
  81. CFT0
  82. TBy default WINET will invoke the command 'WIN'. If this is not your command to run windows you should specify a different command. e.g. For the slowboot version of windows you must say: WINET -xKERNEL
  83. BSB200
  84. CW11
  85. CR1
  86. CFJ1
  87. CFT9
  88. T-?
  89. CFT0
  90. TPrints a summary of arguments.
  91. BSB200
  92. CW11
  93. CR1
  94. CFJ1
  95. CFT9
  96. Tsymfiles
  97. CFT0
  98. TAny number of symbol files may be specified following the other options. Each symbol file must have the extension '.SYM'. If the symbol file is not in the current directory the PATH variable will be searched for it. This makes it easier to specify the system symbol files KERNEL, USER and GDI.
  99. BSB200
  100. CW11
  101. CR1
  102. CFJ1
  103. CFT9
  104. Targuments
  105. CFT0
  106. TAny remaining arguments will be passed to WIN.COM (or other program if -x is used).
  107. BM12
  108. BSB200
  109. CFT9
  110. T Description: 
  111. BSB200
  112. CFT0
  113. TWINET loads addresses of procedures from the specified symbol files. It then invokes WIN.COM. To Windows, WINET looks like SYMDEB so it is able to keep track of where each module is loaded in memory.
  114. BSB200
  115. CFT0
  116. TThe AT's event timer is used to provide an interrupt source every millisecond. Most of these interrupts are ignored, but at the specified interval, an interrupt will be processed.
  117. BSB200
  118. CFT0
  119. TThe current code segment when the interrupt was generated is compared against the known segments. If it matches then the hit count for that segment will be incremented. If the segment also has symbolic information, then a count for the nearest symbol less than or equal in value to the saved program counter will also be incremented.
  120. BSB200
  121. CFT0
  122. TA count is also kept for all interrupts which do not match any of the known segments. This is output as though it had occurred in a segment called 'Others'.
  123. BSB200
  124. CFT0
  125. TSome dummy segments are maintained. *BIOS* counts all hits with CS=F000, *DOS* counts all hits with CS=0070 and *EGA* counts all hits with CS=C000.
  126. BSB200
  127. CFT0
  128. TWhen windows exits the collected data will be output to the specified file. This is in two parts - the segment information, then the procedure information (if any). There is also a header which gives the total number of hits for that session.
  129. BSB200
  130. CFT0
  131. TFor each segment or symbol the number of hits, the percentage é0
  132. S
  133. Thits / totalhits * 100
  134.  é and the name of the segment or symbol are output. The results are not sorted, nor is there any form of graphic output. If either of these are desired then it should be possible to process the output file quite easily using 'scanf'.
  135. BSB200
  136. CFT0
  137. TOnly non-zero counts are displayed.
  138. BM12
  139. BSB200
  140. CFT5
  141. T Bugs and limitations: 
  142. BM12
  143. BSB200
  144. CFT5
  145. TThis program requires an IBM AT or close compatible.
  146. BM12
  147. BSB200
  148. CFT5
  149. TIt has been tested on Microsoft Windows v1.03 (Debugging version) and symbol files produced by MAPSYM v3.10. Other versions may produce unpredictable results. WARNING: This program depends heavily on undocumented features of the aforementioned products.
  150. BSB200
  151. CFT0
  152. TIf any count is reaches 65535 then it will not be incremented further. Other counts may continue to be incremented. In this case the final results produced should be treated with caution.
  153. BSB200
  154. CFT0
  155. TOnly the first 16 modules encountered are used - subsequent module definitions will be ignored. Only the first 256 segments will be used. Segments and modules are defined in the order: Symbol file segments, dummy segments, KERNEL, and other internal windows modules, user programs.
  156. BSB200
  157. CFT0
  158. TThe profile is generated using a clock interrupt. Routines which run with interrupts disabled or interrupt service routines will distort the final results. Routines synchronised to such interrupts may also give anomalous results. Results will vary from run to run.
  159. BSB200
  160. CFT0
  161. TThe output may sometimes imply that a lot of time was spent executing a random  variable  in a program's data segment (DGROUP). e.g. It prints a reference to a symbol MYPROG!DGROUP:Avariable. Time executing segments marked as data is almost invariably produced by the EGA screen driver. This device driver compiles code onto the stack and then executes it. This execution time should really be counted as part of the time in a device driver é0
  162. S
  163. TOf course, your program might really execute its data!
  164.  é.
  165. *E
  166.  
  167.  
  168. Distributed by Public (software) Library.
  169. For a catalog of more than 2000 disks of pd/shareware, call 1-800-2424-PSL
  170. or write Public (software) Library, P.O.Box 35705, Houston, TX 77235-5705.
  171.